package com.huanke.iot.log.dao;

import java.util.List;

import com.huanke.iot.base.po.Alarms.Alarms;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * @author AAJ
 * @version 1.0
 * @date 2020/11/26
 */
@Repository
public interface AlarmDao extends MongoRepository<Alarms, String> {

  List<Alarms> findByMethod(String symboleCode);

//  Alarms findTopByDeviceIdAndAlarmOrderByCreateTimeDesc(String deviceId, String alarm);

  Alarms findTopByMethodAndAlarmAndHandledOrderByAlarmTimeDesc(String deviceId, String alarm, boolean b);

  List<Alarms> findByMethodAndAlarmAndHandled(String method, String diAlarm, boolean b);

}
